﻿CREATE TABLE [dbo].[Task]
(
	[Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY, 
    [Title] NVARCHAR(MAX) NOT NULL, 
    [Outcome] NVARCHAR(MAX) NULL, 
	[AssignedTo] UNIQUEIDENTIFIER NULL ,
    [DateCreated] DATETIME NOT NULL, 
    [DateClosed] DATETIME NULL, 
    [ClosedBy] UNIQUEIDENTIFIER NULL, 
    CONSTRAINT [FK_Task_User_Assigned] FOREIGN KEY ([AssignedTo]) REFERENCES [User]([UserId]),
	CONSTRAINT [FK_Task_User_Closed] FOREIGN KEY ([ClosedBy]) REFERENCES [User]([UserId])
)
